/** * @description: 行为失范预警，心理预警，学业预警，寝室上报异常共用 */
<template>
  <div>
    <div class="floor">
      <div class="header">
        <div class="header-left">
          <label>菲菲</label>
          <div>
            <p>
              <span>李菲菲</span>
              <span class="warning" v-if="isBehaviorAnomie">一集预警</span>
            </p>
            <span class="stu-no">232313123</span>
          </div>
        </div>
        <div class="header-right">
          <span class="no-deal">未处理</span>
          <span class="date">2022-12-12</span>
        </div>
      </div>
      <div class="content" v-if="!isRoom">
        <p>
          <label>预警原因：</label>
          <span>行踪不明</span>
        </p>
        <p>
          <label>预警时间：</label>
          <span>2021-12-12</span>
        </p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'BehaviorAnomie',
  props: {
    //是否是行为失范
    isBehaviorAnomie: {
      type: Boolean,
      default: false,
    },
    //是否是寝室异常
    isRoom: {
      type: Boolean,
      default: false,
    },
  },
}
</script>

<style lang="scss" scoped>
.floor {
  background: $bg-white;
  padding: 20px 12px;
  border-radius: 10px;
  margin-top: 12px;
  .header {
    display: flex;
    justify-content: space-between;
    &-left {
      display: flex;
      > label {
        width: 48px;
        height: 48px;

        line-height: 48px;
        text-align: center;
        font-size: $fz14;
        color: #fff;
        border-radius: 50%;
        background: #2e6cf6;
      }
      > div {
        margin-left: 12px;
        .stu-no {
          display: block;
          margin-top: 5px;
          font-size: $fz14;
        }
      }
      p {
        display: flex;
        font-size: $fz14;
        .name {
          font-size: $fz18;
          font-weight: bold;
        }
        .warning {
          width: 71px;
          height: 20px;
          line-height: 22px;
          text-align: center;
          margin-left: 8px;
          font-size: $fz12;
          color: #ff3c3c;
          background: #ffdfdf;
          border-radius: 10px;
          border-top-left-radius: 2px;
        }
      }
    }
    &-right {
      display: flex;
      flex-direction: column;
      align-items: end;

      .no-deal {
        width: 44px;
        height: 18px;
        line-height: 18px;
        font-size: $fz12;
        text-align: center;
        color: #ff3c3c;
        background: #ffdfdf;
      }
      .date {
        margin-top: 9px;
        font-size: $fz12;
        color: #97979f;
      }
    }
  }
  .content {
    padding-left: 60px;
    p {
      font-size: $fz14;
      margin-top: 8px;
      label {
        color: #5f5f6b;
      }
    }
  }
}
</style>
